import requests

url = "http://127.0.0.1:9988/receive-json"
json_data = {
    "username": "zhangsan",
    "age": 25,
    "email": "zhangsan@example.com",
    "hobbies": ["reading", "coding"],
}

# requests.post 会自动设置 Content-Type: application/json
response = requests.post(url, json=json_data)
print(response.json())  # 打印响应（JSON格式）
